package com.zygame.sdk.bean;

import android.os.Parcel;
import android.os.Parcelable;

public class Item implements Parcelable{
	public String id;
	public String pid;
	public String  name;
	public String action;
	public String src;
	public String type;
	public String auth;
	public String url;
	public String pos;
	public String toolbar;
	
	public Item(){}
	
	public Item(String id,String pid,String name,String action,String src,String type,String auth,String url,String pos,String toolbar){
		this.id = id;
		this.pid = pid;
		this.name = name;
		this.action = action;
		this.src = src;
		this.type = type;
		this.auth = auth;
		this.url = url;
		this.pos = pos;
		this.toolbar = toolbar;
	}
	
	@Override
	public int describeContents() {
		return 0;
	}
	@Override
	public void writeToParcel(Parcel dest, int flags) {
		//		读和写的顺序要一致
		dest.writeString(id);
		dest.writeString(pid);
		dest.writeString(name);
		dest.writeString(action);
		dest.writeString(src);
		dest.writeString(type);
		dest.writeString(auth);
		dest.writeString(url);
		dest.writeString(pos);
		dest.writeString(toolbar);
		
	}
	
	public Item(Parcel parcel){
		//		读和写的顺序要一致
		id = parcel.readString();
		pid = parcel.readString();
		name = parcel.readString();
		action = parcel.readString();
		src = parcel.readString();
		type = parcel.readString();
		auth = parcel.readString();
		url = parcel.readString();
		pos = parcel.readString();
		toolbar = parcel.readString();
	}
	
	public final static Parcelable.Creator<Item> CREATOR = new Creator<Item>() {
		@Override
		public Item createFromParcel(Parcel source) {
			return new Item(source);
		}

		@Override
		public Item[] newArray(int size) {
			return new Item[size];
		}
	};
}
